:root{
  --bg:#0e0e0e;
  --accent:#FFD700; /* bright yellow */
  --panel:rgba(0,0,0,.6);
  --font:'Press Start 2P', cursive;
}

*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

html,body{
  margin:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:var(--bg);
  font-family:var(--font);
}

/* ---------- SCREENS ---------- */
.screen{
  position:absolute;
  inset:0;
  display:none;
  flex-direction:column;
  justify-content:center;
  align-items:center;
}

.screen.active{
  display:flex;
}

/* ---------- MAIN TEXT ---------- */
.title{
  color:var(--accent);
  font-size:clamp(2.2rem,6vw,3.5rem);
  text-align:center;
}

.caption{
  color:var(--accent);
  font-size:clamp(1rem,3vw,1.4rem);
  max-width:90%;
  text-align:center;
  margin:20px 0;
}

/* ---------- BUTTONS ---------- */
.game-button{
  background:#222;
  color:var(--accent);
  border:4px solid var(--accent);
  padding:20px 36px;
  font-size:1rem;
  border-radius:18px;
  margin:14px;
  font-family:var(--font);
}

.game-button:hover{
  background:var(--accent);
  color:#000;
}

/* ---------- GAME ---------- */
#game-container{
  width:100%;
  height:100%;
  background:#141414;
}

#game-track{
  position:absolute;
  bottom:0;
  width:100%;
  height:26vh;
  min-height:180px;
  border-top:6px solid #555;
}

/* ---------- SCORE ---------- */
#score-board{
  position:absolute;
  top:14px;
  left:14px;
  background:var(--panel);
  padding:14px 18px;
  border-radius:14px;
  font-size:1.1rem;
  color:#ffffff; /* BRIGHT WHITE */
}

#score{
  font-size:1.4rem;
  color:#ffffff;
}

/* ---------- PLAYER ---------- */
#player{
  position:absolute;
  left:70px;
  bottom:5px;
  width:56px;
  height:84px;
  image-rendering:pixelated;
}

#player::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    /* hair */
    linear-gradient(#3b2415 0 0) 14px 0 /28px 10px,
    /* head */
    linear-gradient(#f7d5b2 0 0) 10px 10px /36px 24px,
    /* eyes */
    linear-gradient(#000 0 0) 18px 18px /5px 5px,
    linear-gradient(#000 0 0) 33px 18px /5px 5px,
    /* shirt */
    linear-gradient(#4a8bff 0 0) 6px 38px /44px 22px,
    /* legs */
    linear-gradient(#222 0 0) 14px 60px /12px 22px,
    linear-gradient(#222 0 0) 30px 60px /12px 22px,
    /* shoes */
    linear-gradient(#000 0 0) 12px 82px /18px 6px,
    linear-gradient(#000 0 0) 28px 82px /18px 6px;
  background-repeat:no-repeat;
}

/* ---------- GAME ELEMENTS ---------- */
.game-element{
  position:absolute;
  image-rendering:pixelated;
}

/* ---------- TRAFFIC CONES (FIXED SIZE) ---------- */
.traffic-cone{
  width:30px;
  height: 50px;
  background:
    linear-gradient(
      #ffffff 0 18%,
      #ff7b00 18% 55%,
      #ffffff 55% 75%,
      #ff7b00 75% 100%
    );
  border-bottom:10px solid #000;
  border-radius:6px;
  bottom:5px;
}

/* ---------- COINS ---------- */
.coin{
  width:52px;
  height:52px;
  background:#FFD700;
  border-radius:50%;
  box-shadow: inset 0 0 0 10px #fff2a8;
  bottom:110px;
}

/* ---------- HEARTS ---------- */
.heart{
  width:48px;
  height:48px;
  background:#ff3b3b;
  transform:rotate(-45deg);
  bottom:105px;
}

.heart::before,
.heart::after{
  content:"";
  width:48px;
  height:48px;
  background:#ff3b3b;
  border-radius:50%;
  position:absolute;
}

.heart::before{
  top:-24px;
  left:0;
}

.heart::after{
  left:24px;
  top:0;
}

/* ---------- POPUPS ---------- */
.popup-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.8);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:10;
}

.popup-box{
  background:#111;
  border:4px solid var(--accent);
  padding:30px;
  max-width:85%;
  text-align:center;
  color:var(--accent);
  border-radius:20px;
  font-size:1rem;
}

/* ---------- GAME OVER ---------- */
.game-over-title{
  color:#ff4444;
  font-size:clamp(2.5rem,6vw,3.8rem);
}

.score-final{
  font-size:1.5rem;
  color:#ffffff;
  margin:20px 0;
}